package com.gw.smscheck.service.business.alarm.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.gw.smscheck.dao.business.alarm.AlarmLogMapper;
import com.gw.smscheck.entity.business.alarm.AlarmLog;
import com.gw.smscheck.service.business.alarm.AlarmLogService;
@Service
public class AlarmLogServiceImpl implements AlarmLogService {
	@Autowired
	private AlarmLogMapper alarmLogMapper;
	@Override
	public Integer add(AlarmLog alarmLog) {
		return alarmLogMapper.add(alarmLog);
	}
	@Override
	public List<AlarmLog> findAll() {
		return alarmLogMapper.findAll();
	}
	@Override
	public List<AlarmLog> findMapAlarmType() {
		return alarmLogMapper.findMapAlarmType();
	}
	@Override
	public List<AlarmLog> jurisdictionProportion() {

		return alarmLogMapper.jurisdictionProportion();
	}
	@Override
	public PageInfo<AlarmLog> pageSelect(AlarmLog dto) {
		PageHelper.startPage(dto.getPage(), dto.getRows(), "create_time desc");// 排序
		List<AlarmLog> resultList = alarmLogMapper.pageSelect(dto);
		PageInfo<AlarmLog> pageInfo = new PageInfo<>(resultList);
		return pageInfo;
	}
	@Override
	public AlarmLog findById(Integer dto) {
		return alarmLogMapper.findById(dto);
	}
	@Override
	public PageInfo<AlarmLog> findByType(AlarmLog dto) {
		PageHelper.startPage(dto.getPage(), dto.getRows(), "create_time desc");// 排序
		List<AlarmLog> resultList = alarmLogMapper.findByType(dto);
		PageInfo<AlarmLog> pageInfo = new PageInfo<>(resultList);
		return pageInfo;

	}
	@Override
	public Integer update(AlarmLog alarmLog) {
		return alarmLogMapper.update(alarmLog);
	}
	@Override
	public Integer delByIds(String[] ids) {
		return alarmLogMapper.delByIds(ids);
	}
}

